package com.example;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    @RequestMapping("/name")
    public String test(){
        rabbitTemplate.convertAndSend("name","贾眀祯");

        return "可能成功了吧";
    }

}
